package com.wms.minio;

import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MinioConfig {
    @Autowired
    private MinioPojo minio;
    @Bean
    public MinioClient getMinioClient() {
        return MinioClient.builder()
                .endpoint(minio.getUrl())
                .credentials(minio.getUsername(),
                        minio.getPassword()).build();
    }
}
